using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Globalization;
using System.Text;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

using Las.Model; 

namespace Las.Dal
{
    public partial class DaAssessStandard
    {
        const string SQL_GET_ASS_STD_SUB_GROUPS = "SELECT A,MIN(ASS_STD_ID) AS MINID,COUNT(A) AS ACNT FROM LA_ASSESS_STANDARD WHERE ASS_STD_GROUP_ID=@ASS_STD_GROUP_ID GROUP BY A ORDER BY MINID";

        public List<string> GetAssStdSubGroups(string assStdGrpID_)
        {
            List<string> rc = new List<string>();
            DbCommand cmd = db.GetSqlStringCommand(SQL_GET_ASS_STD_SUB_GROUPS);
            db.AddInParameter(cmd, "ASS_STD_GROUP_ID", DbType.String, assStdGrpID_);
            using (IDataReader reader = db.ExecuteReader(cmd))
            {
                while (reader.Read())
                {
                    rc.Add(reader.GetString(0));
                }
            }
            return rc;

        }

        
    }
}
